<template>
  <h1>El-分栏布局组件</h1>
  <!-- 分栏式布局行总共24份 -->
  <el-row>
    <el-col :span="6" style="background-color: #0aa1ed;">111</el-col>
    <el-col :span="6" style="background-color: #f00;">121</el-col>
    <el-col :span="6" style="background-color: #0aa1ed;">131</el-col>
    <el-col :span="6" style="background-color: #f00;">141</el-col>
  </el-row>

  <h3>两张图</h3>
  <!--gutter表示列间距的行  -->
  <el-row gutter="20">
    <el-col :span="12"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="12"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
  </el-row>

  <h3>六张图</h3>
  <el-row gutter="10">
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
  </el-row>

  <h3>三张图 图片宽度比例1:2：3</h3>
  <el-row>
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
    <el-col :span="12"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
  </el-row>

  <h3>一共8列，每列显示数字1，2，3...8</h3>

<!--  <el-row>
    <el-col :span="3">1</el-col>
    <el-col :span="3">2</el-col>
    <el-col :span="3">3</el-col>
    <el-col :span="3">4</el-col>
    <el-col :span="3">5</el-col>
    <el-col :span="3">6</el-col>
    <el-col :span="3">7</el-col>
    <el-col :span="3">8</el-col>
  </el-row>-->
  <el-row>
    <el-col :span="3" v-for="item in 8">{{item}}</el-col>
  </el-row>

  <!--:offset默认值为0 默认靠左，写几就向右移动几份，总共24份  -->
  <h3>列偏移</h3>
  <el-row>
    <el-col :span="20" :offset="2"><img src="imgs/rich.jpg" style="width: 100%"></el-col>
  </el-row>

  <!--布局嵌套  -->
  <el-row>
    <el-col :span="12" style="border: 5px solid #f00;">左侧</el-col>
    <el-col :span="12" style="border: 5px solid #0f0;">
        <!--嵌套式，一定吧当前元素再看作一个新的row，还是24份，在进行分配      -->
      <el-row>
        <el-col :span="8" style="border: 5px solid #0f0">111</el-col>
        <el-col :span="8" style="border: 5px solid #ff0">112</el-col>
        <el-col :span="8" style="border: 5px solid #0ff">113</el-col>
      </el-row>

    </el-col>
  </el-row>
</template>

<script setup>

</script>

<style scoped>

</style>